package org.rescue.data.extraction;

import java.util.*;

/**
 * An AnnotationSet is a collection of one or more Annotations representing
 * possible concept matches for a particular Document in the Dataset.  Multiple
 * Annotations in a given AnnotationSet can be considered as to have an OR relationship 
 * representing distinct concepts which the extraction/classification/disambiguation 
 * processes could not completely resolve to a single concept.  All Annotations in 
 * a given AnnotationSet must refer to concepts in the same taxonomy.
 * 
 * @author jlickfet
 *
 */
public class AnnotationSet {

	ArrayList<Annotation> annotations;
	int taxonomyId;
	
	
	public AnnotationSet(int taxonomyId) {
		annotations = new ArrayList<Annotation>(0);
		this.taxonomyId = taxonomyId;
	}
	
	public void addAnnotation(Annotation a) {
		annotations.add(a);
	}
	
	public ArrayList<Annotation> getAnnotations() {
		return annotations;
	}
	
	public ArrayList<Integer> getAnnotationIds() {
		ArrayList<Integer> ids = new ArrayList<Integer>();
		for (Annotation a : annotations) {
			ids.add(a.getId());
		}
		return ids;
	}
	
	public int getTaxonomyId() {
		return taxonomyId;
	}
	
}
